using System;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration.Claims;

namespace CNRS.CCP.Features.CNRSccpFeature
{
	/// <summary>
	/// This class handles events raised during feature activation, deactivation, installation, uninstallation, and upgrade.
	/// </summary>
	/// <remarks>
	/// The GUID attached to this class may be used during packaging and should not be modified.
	/// </remarks>

	[Guid("5068723f-107c-49dd-86e1-1d706ce5b2e6")]
	public class CNRSccpFeatureEventReceiver : SPClaimProviderFeatureReceiver
	{
		public override string ClaimProviderAssembly
		{
			get { return typeof(ClaimProvider).Assembly.FullName; }
		}

		public override string ClaimProviderDescription
		{
			get { return "CNRS custom claim provider http://cnrsccp.codeplex.com"; }
		}

		public override string ClaimProviderDisplayName
		{
			get { return ClaimProvider.PROVIDER_NAME_DISPLAY; }
		}

		public override string ClaimProviderType
		{
			get { return typeof(ClaimProvider).FullName; }
		}

		public override void FeatureActivated(SPFeatureReceiverProperties properties)
		{
			ExecBaseFeatureActivated(properties);
		}

		private void ExecBaseFeatureActivated(Microsoft.SharePoint.SPFeatureReceiverProperties properties)
		{
			// Wrapper function for base FeatureActivated. 
			// Used because base keywork can lead to unverifiable code inside lambda expression
			base.FeatureActivated(properties);
		}
	}
}
